<template>
  <div>
    <transition name="fade">
        <slot></slot>
    </transition>
  </div>
</template>

<script>
export default {
    name:""//name是vue.component(name,function(){})中的name,这里不能命名为transition因为会死循环
}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped lang="less">
    .fade-enter-active,.fade-leave-active{
        opacity:1
    }
    .fade-enter,.fade-leave-to{
        opacity:0;
        transition:opacity .5s
    }
</style>
